package com.zhb.service.impl;

import com.zhb.entity.Product;
import com.zhb.mapper.ProductMapper;
import com.zhb.service.IProductService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zhb
 * @since 2021-09-09
 */
@Service
@AllArgsConstructor
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements IProductService {

    private final ProductMapper productMapper;

    @Override
    public int reduceProduct(String productCode, Integer count) {
        return productMapper.reduceProduct(productCode, count);
    }
}
